package com.example.study;

import java.util.ArrayList;
import java.util.List;

/**
 * VM args:-Xms10m -Xmx10m -XX:+HeapDumpOnOutOfMemoryError
 * 
 * @author lli
 *
 * @version 1.0
 *
 */
public class HeamOOM {

    public static void main(String[] args) {
        List<OOMObject> list = new ArrayList<OOMObject>();
        int i=0;
        while (true) {
            list.add(new OOMObject());
            System.out.println(i++);
        }

    }

    static class OOMObject {

    }
}
